lkEngine - Lankhor 3D Renderer
(c) 1999, 2000 Lankhor

Historic File
-------------

TODO : - finish CMatrix class
       - include a particle system (the one of F1WGP99, but enhanced with possible 
         collisions using an octree)
       - make collision functions for the octree
       - make a material management
       - add a text-display system using fonts
       - general texture pixelformat convertion function
       - reorganize COctree a bit, to store ALL meshes in the internal CX3D2Scene,
         which would allow easier octree-scene management
       - optimize the CheckAABoundingBox function
       - make better datas : points belonging to the same face should not be too distant in the
         point list, to avoid cache misses as much as possible (CPU cache miss or GPU cache miss)
       - organize textures to have alpha textures AFTER non-alpha textures in the list : it will
         allow to flush only the textures that are bufferized, and not the textures that are not,
         like texture used only for indexed meshes & so
       - T&L Renderer : make the "donotcull" flag being effective at face level instead of texture
         level.

20/10/2000 - Version 1.08.100
-----------------------------

    - Made several optimizations to the non-hardware TnL renderer. The 3D engine now runs smoother
      on low-end computers.

18/10/2000 - Version 1.08.050
-----------------------------

    - Changed a bit the shadowcaster logic to avoid transforming the shadowreceiver mesh being
      transformed in world space for nothing when no shadow hits the mesh.
    - Indexed meshes are no more always clipped on ZNear plane when at least a plane is clipped.
      That allow to avoid lots of ZNeat clip tests when the mesh is just clipped by a 2D plane.

16/10/2000 - Version 1.08.000
-----------------------------

    - Optimized a bit the T&L version by avoiding to apply useless SetRenderWindow.
    - Can't disable ZBuffer anymore on T&L DLL (not really cool)

13/10/2000 - Version 1.07.950
-----------------------------

    - Fixed a major bug with the guardband clipper that was used even when rendering for a mirror
      This was not a crash bug, but rather a performance bug since guardbanding eats lot of fillrate,
      it is not recommended except for the main rendering window, where the surface to render is wide
      enough to reduce impact of fillrate.
    - Fixed a bug in the target texture for rendering - now accept Blt for more cards (Radeon works
      fine with that now).

12/10/2000 - Version 1.07.910
-----------------------------

    - Fixed a bug in the ComputeMipLevels function - miplevels are now totally correct
    - Now X3D2 loading allow not skip not used miplevels - less memory used and thus more speed
    - Restored the "render in texture" in behalf of the "blit to texture" method to render in a
      texture - hope it works everywhere!
    - Changed the wMaxTextureBlendStages check to 2 minimum instead of 1, to avoid bugs on Voodoo 
      cards
    - Fixed a bug in the 3Dnow! CheckAABoundingBox with top and bottom preclipping (the fustrum 
      now precomputes the "-" for y components)

11/10/2000 - Version 1.07.900
-----------------------------

    - Now preclipping is in a separated source file.
    - Started writing a 3Dnow! version of CheckAABoundingBox, that is fully compatible the standard
      one. A SSE version should follow then. Both of them are using the Processor Pack for Visual
      C++ 6.0. More SSE-optimized version of time-critical functions should follow now that the
      processor pack allow an easier debugging.
    - Shadows are now in their own source file (one for T&L and one for non-T&L)

10/10/2000 - Version 1.07.550
-----------------------------

    - Fixed an initialization bug in the T&L shadowcaster that caused the first shadow encountered
      being wrong at the first computed frame.
    - Fixed double sided problem for T&L renderer (partially - still have to make a clear difference
      between doublesided and non-doublesided meshes that uses the same texture).
      The flag is currently a texture flag, which is wrong.
    - Optimized the texture buffer flush of T&L renderer like the soft : now only flushing buffers
      up to "NbLastTexture", that is the last texture initialized in the texture list.
    - Texture detail uses direct texture number instead of texture ID now - do not use FindID 
      anymore. It means that the detail texture HAS to be loaded BEFORE the textures that uses it.

06/10/2000 - Version 1.07.500
-----------------------------

    - Shadow system optimized a bit (still some "hardcore optimizations" to do).
    - Shadow system included into the T&L rendering DLL.
    - T&L DLL now no more hangs at loading when compiled with the Microsoft Processor Pack. It will
      allow the full usage of Processor Pack for lkEngine compilation, and so the real usage of
      Intel's SSE and AMD's 3Dnow! instructions sets (without having to hack too much assembly).

03/10/2000 - Version 1.07.000
-----------------------------

    - The shadow system is now up and working well, except for some small bugs... The code is
      not fully optimized yet, but will be soon.

29/09/2000 - Version 1.06.900
-----------------------------

    - Been working on a realtime shadowcaster (in X/Z plane only). Shadow preclip against mesh 
      works fine, point shadow detection works fine. Only shadow texture coordinates computation
      is bugged, and the faces that are not totally into the shadow are wrong. Otherwise, it works
      fine, but it is still too slow. Need some optimizations (like bounding-sphere preclipping 
      before pseudo bounding-box preclipping, vertex computation to make faster, etc etc).

27/09/2000 - Version 1.06.600
-----------------------------

    - Added mipmap computation capacity for TGA-loaded textures

22/09/2000 - Version 1.06.500
-----------------------------

    - Added mipmap lod bias support - can now configure the mipmap LOD bias where supported

20/09/2000 - Version 1.06.100
-----------------------------

    - Fixed a bug with doublemapping and heat effect : texture stage 1 is no more locked to CLAMP

19/09/2000 - Version 1.06.000
-----------------------------

    - Added the heat effect to the T&L DLL (included clippers, transform functions, and so, to get
      the function to work as in the standard DLL).
    - Fixed a potential flaw of the lkEngine for "untransformed extra faces" added on the fly

18/09/2000 - Version 1.05.500
-----------------------------

    - Fixed a memory leak in the detail texture loader
    - Added 2 functions to strip miplevels from a C3D or a T3D texture
    - Fixed the bug of the heat effect : now should work on both Radeon and PowerVR Series 3 cards

15/09/2000 - Version 1.05.200
-----------------------------

    - Fixed several bugs in octree generation (misoriented faces, false illuminations, ...)
    - Fixed several bugs in octree elevation

08/09/2000 - Version 1.05.100
-----------------------------

    - Fixed a small bug in guard band clipper, thanx to VTune : the YBottom guard-band clippers 
      were never used because of a bug in the guardband availability check (was checked using the 
      TOP instead of the BOTTOM guardband value)
    - Limited guardbanding to a [-2048;2047] range to avoid massive loss in speed due to fillrate
    - Made a small optimization on flushes - now only try to flush texture up to the last allocated,
      thus economizing a lot of non-initialized textures
    - Fixed an elevation problem by giving a "MaxY" value to the elevation computing function

06/09/2000 - Version 1.05.000
-----------------------------

    - Added octree elevation - a kind of simplified collisions
      Still have the real collisions (arbitrary mesh against octree) to do
      Should make a "segment againts octree" collision system to begin (allow particle collisions)
    - Fixed a bug in the octree exporter : the exporter was allocating memory for ExtraMeshes
      even when there was NO extrameshes at all, causing the WriteM3D function to fail when
      trying to write extramesh list
    - Start the adding of a "face by material" counter on the fly, to be able to flush 
      the texture's face-buffer when we know there won't be anymore faces coming at this
      frame for that texture

09/08/2000 - Version 1.04.000
-----------------------------

    - GuardBand clipper seems to work fine - I will test with TNT2 and GeForce cards
    - Added the "BaseTexture" handling to the COctree class, to allow a more complete scene
      handling in a real-life working environment
    - Overloaded the SendMeshes method of the CX3D2Scene class to allow a better "BaseTexture" 
      handling (added a parameter to the SendMeshes method)
    - Fixed a major memory leak in the non-TnL renderer
    - Added Creation/Deletion of COctree objects for users
    - Now scene informations are imported/exported to/from the octree from/to the X3D2 Scene

07/08/2000 - Version 1.03.500
-----------------------------

	- Added a per-face doublesided flag, work on the non-TnL renderer, the TnL renderer still
	  only put all alpha faces as 2 sided. Still compatible with F1WGP format
	- Added an exclusion list for the octree generation, saved in the M3D file to be able to
	  use the excluded meshes, still being in the COctree object but not in the tree
	- Fixed several bugs in the CX3D2Scene, concerning the load of meshes and textures
	- Added first version of the guardband clipper - quite buggy for now, will try with a 
	  GeForce2 card to compare.

04/08/2000 - Version 1.03.000
-----------------------------

    - Fixed a bug in the octree exporter : the mesh number wasn't exported properly
    - Fixed a bug in the octree reloader : a check was causing recursion to stop too soon
    - Fixed a bug in the octree generator : normal computation for cutted vertices was
      wrong, since it was written for the old X3D2 format normals, and thus was conflicting
      with the current normal format

02/08/2000 - Version 1.02.900
-----------------------------

    - Added a progress bar handler for octree computing and C3D generation
    - Fixed a nasty, nasty bug in X3D2_DuplicateMesh that was causing a memory overflow
    - Tested succesfully the first part of the Octree exporter
    - Added the read/write operations for the octree - seems to work fine!
    - Will test it a lot more tomorrow, and hopefully the engine will go to the 1.03 version!

27/07/2000 - Version 1.02.800b
------------------------------

    - Fixed the GREEN FLAG bug in F1WGP - was only a data-bug, not an engine-bug

24/07/2000 - Version 1.02.800
-----------------------------

    - Added a SENDINFO_MULTIPLICATIVE flag for the SendInfo functions, to set blending to multiplicative
    - Fixed a small bug in the Octree generation
    - Began reflexion on the PVS implementation for Octrees

20/07/2000 - Version 1.02.700
-----------------------------

    - Worked on a pre-version of the Octree loader
    - Add a ReplaceT3DTexture in the CX3D2Scene class, to allow user to just replace a texture by another 
      one without having to recreate a whole T3D

12/07/2000 - Version 1.02.500
-----------------------------

    - Added a function to get a TGA shot of the current content of the backbuffer
      Allows screenshots, and movies shots

10/07/2000 - Version 1.02.100
-----------------------------

    - Fixed a bug in the texture pixelformat convertion - now supports both 555 and 1555 for texture input
      Added a "general texture pixelformat convertion function" in the TODO list

30/06/2000 - Version 1.02
-------------------------

    - Included some bugfixes (now check for Non Power Of 2 texture mapping before trying
      to do the shimmer effect).
    - Added a "MemoryLoad", to load old T3D, C3D and M3D files from a memory-buffer.
    - The CX3D2Scene now can create the C3D from the T3D
    - The CX3D2Scene now can write old-format X3D2 scenes
    
16/05/2000 - Version 1.01
-------------------------

    - Creation of this historic (a bit late maybe)
      Some major updates has begun since the 1.00 version, here are
      reported most of them.
    - Added COctreeLeaf class (used only by COctree class, this is the
      core of the octree system)
    - Added COctree class
      This class handles creation and management of octrees from X3D2
      scenes. It is not plugged into the drivers since it is very
      generic, and thus is just using the drivers.
    - Added some mathematics classes :
        - CQuat class to handle quaternions
        - CMatrix class to handle matrix
      These classes are the fundation of the brand-new mathematic library
      that is contained by the lkEngine core.
    - Now the 3D engine functionnalities are grouped together into the Render.dll
      library. The 3D Engine is now organized in 2 complementary parts :
        - the 3D engine core, that contains the HIGH LEVEL stuff (Render.dll)
          The high level tasks include the peripheral drivers management, but also
          much more things, like a mathematic library, the X3D2 management 
          functions (for all purposes : reading, writing, using), a scene 
          manager (octree), the CError class to handle errors from the engine,
          and so on.
        - the peripherals drivers, that contains all the low-level, OS-specific
          part of the engine (currently D3DRender.dll and D3DRenderTnL.dll)


28/04/2000 - Version 1.00
-------------------------

    - Engine used for F1 World Grand Prix 99 - considered as 1.00 version since.


[... here, time has ran out to maintain historic ...]

